package foodmaterial.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import foodmaterial.utils.Constants;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class MealsTypeTemplate implements Serializable {

    private static final long serialVersionUID = 5474005589156205025L;
    private Long id ;
    private Long typeId ;
    private String typeName;
    @NotEmpty(message = "餐别模板名称不能为空")
    private String name ;
    @JsonFormat(pattern= Constants.DEFAULT_DATE_FORMAT,timezone="GMT+8")
    private Date inputDate ;
    @Size(min= 1,message = "餐别模板最少有一条明细")
    @Valid
    private List<MealsTypeTemplateDetails> details ;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getInputDate() {
        return inputDate;
    }

    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }

    public List<MealsTypeTemplateDetails> getDetails() {
        return details;
    }

    public void setDetails(List<MealsTypeTemplateDetails> detail) {
        this.details = detail;
    }
}
